import {
	mapGetters
} from 'vuex'
export default {
	onShow() {
		this.setBadge()
	},
	computed: {
		...mapGetters('my_cart', ['total']),
	},
	methods: {
		setBadge() {
			// tabbar上面的徽标
			uni.setTabBarBadge({
				index: 2, //tabbar 索引
				text: this.total + '' //text值为字符串
			})
		}
	}

}